import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/account/models/user_bank_entity.dart';

UserBankEntity $UserBankEntityFromJson(Map<String, dynamic> json) {
  final UserBankEntity userBankEntity = UserBankEntity();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    userBankEntity.id = id;
  }
  final String? bankId = jsonConvert.convert<String>(json['bankId']);
  if (bankId != null) {
    userBankEntity.bankId = bankId;
  }
  final String? bankName = jsonConvert.convert<String>(json['bankName']);
  if (bankName != null) {
    userBankEntity.bankName = bankName;
  }
  final String? cardNo = jsonConvert.convert<String>(json['cardNo']);
  if (cardNo != null) {
    userBankEntity.cardNo = cardNo;
  }
  final String? cardUsername = jsonConvert.convert<String>(json['cardUsername']);
  if (cardUsername != null) {
    userBankEntity.cardUsername = cardUsername;
  }
  final String? cover = jsonConvert.convert<String>(json['cover']);
  if (cover != null) {
    userBankEntity.cover = cover;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    userBankEntity.createTime = createTime;
  }
  final double? withdrawAmount = jsonConvert.convert<double>(json['withdrawAmount']);
  if (withdrawAmount != null) {
    userBankEntity.withdrawAmount = withdrawAmount;
  }
  final int? withdrawTimes = jsonConvert.convert<int>(json['withdrawTimes']);
  if (withdrawTimes != null) {
    userBankEntity.withdrawTimes = withdrawTimes;
  }
  return userBankEntity;
}

Map<String, dynamic> $UserBankEntityToJson(UserBankEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['bankId'] = entity.bankId;
  data['bankName'] = entity.bankName;
  data['cardNo'] = entity.cardNo;
  data['cardUsername'] = entity.cardUsername;
  data['cover'] = entity.cover;
  data['createTime'] = entity.createTime;
  data['withdrawAmount'] = entity.withdrawAmount;
  data['withdrawTimes'] = entity.withdrawTimes;
  return data;
}